package my.test.memento.source;

/**
 * @Author 许玉康
 * @Date 2019/9/29 12:59
 */
public class Client {

    public static void main(String[] args) {
        //定义出发起人
        Originator originator = new Originator();
        //定义出备忘录的管理员
        Caretaker caretaker = new Caretaker();
        //创建一个备忘录
        caretaker.setMemento(originator.createMemento());
        //恢复一个备忘录
        originator.restoreMemento(caretaker.getMemento());
    }
}
